﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FreeGoo.GameEngine
{
    public static class MiscExtensions
    {
        public static string ToLowerInvariant(this string str)
        {
            return str.ToLower(CultureInfo.InvariantCulture);
        }

        public static void RemoveAll<TType>(this List<TType> list, Func<TType, bool> predicate)
        {
            List<TType> toDelete = list.Where(predicate).ToList();
            toDelete.ForEach(item => list.Remove(item));
        }
    }
}
